package com.jsyl.lwbk.business.mapper.education;

import com.jsyl.lwbk.business.domain.education.TrainingProgram;
import com.jsyl.lwbk.business.dto.education.TrainingProgramListDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TrainingProgramMapper {
    int insert(TrainingProgram record);

    TrainingProgram selectById(Long id);

    List<TrainingProgram> findTrainingProgramList(String trainingProgramNumber);

    List<TrainingProgram> findList(TrainingProgramListDTO trainingProgramListDTO);

    TrainingProgram findByExample(TrainingProgramListDTO trainingProgramListDTO);

    List<TrainingProgram> listAvaliable(TrainingProgramListDTO trainingProgramListDTO);

    void updateTrainingLevel(@Param("sql") String sql);

    int updateById(TrainingProgram record);

    int subjectCount(@Param("questionId") Long questionId,@Param("trainScore") Integer trainScore);

    /**
     * 根据题目模块+题目+题目分数 筛选出题目，全部设置为已删除。
     *
     * @param evaluateModuleType
     * @param questionId
     * @param trainingScore
     * @return
     */
    int updateTrainingProgramDelete(@Param("evaluateModuleType") Integer evaluateModuleType, @Param("questionId") Long questionId, @Param("trainingScore") Integer trainingScore);
}